package com.danciyixue.boot.dcyx.model.form;

import java.io.Serial;
import java.io.Serializable;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import java.time.LocalDateTime;
import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.validation.constraints.*;

/**
 * 用户信息表单对象
 *
 * @author youlaitech
 * @since 2025-06-15 16:58
 */
@Getter
@Setter
@Schema(description = "用户信息表单对象")
public class DcyxUsersForm implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(description = "用户ID")
    private Long id;

    @Schema(description = "所属组织ID")
    @NotNull(message = "所属组织ID不能为空")
    private Long organizationId;

    @Schema(description = "用户名")
    @NotBlank(message = "用户名不能为空")
    @Size(max=64, message="用户名长度不能超过64个字符")
    private String username;

    @Schema(description = "密码")
    @NotBlank(message = "密码不能为空")
    @Size(max=64, message="密码长度不能超过64个字符")
    private String password;

    @Schema(description = "姓名")
    @NotBlank(message = "姓名不能为空")
    @Size(max=64, message="姓名长度不能超过64个字符")
    private String fullname;

    @Schema(description = "性别,0-未知,1-男,2-女")
    @NotNull(message = "性别,0-未知,1-男,2-女不能为空")
    private Integer gender;

    @Schema(description = "手机号")
    @NotBlank(message = "手机号不能为空")
    @Size(max=20, message="手机号长度不能超过20个字符")
    private String mobile;

    @Schema(description = "学校名称")
    @NotBlank(message = "学校名称不能为空")
    @Size(max=128, message="学校名称长度不能超过128个字符")
    private String schoolName;

    @Schema(description = "负责老师ID")
    private Long assignedTeacherId;

    @Schema(description = "年级")
    @NotBlank(message = "年级不能为空")
    @Size(max=32, message="年级长度不能超过32个字符")
    private String grade;

    @Schema(description = "微信ID")
    @NotBlank(message = "微信ID不能为空")
    @Size(max=64, message="微信ID长度不能超过64个字符")
    private String wechatId;

    @Schema(description = "QQ号")
    @NotBlank(message = "QQ号不能为空")
    @Size(max=64, message="QQ号长度不能超过64个字符")
    private String qq;

    @Schema(description = "最后成绩")
    @NotNull(message = "最后成绩不能为空")
    private Integer lastScore;

    @Schema(description = "账号过期时间")
    @NotNull(message = "账号过期时间不能为空")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime expireTime;

    @Schema(description = "最近登录时间")
    @NotNull(message = "最近登录时间不能为空")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime loginTime;

    @Schema(description = "电子邮箱")
    @NotBlank(message = "电子邮箱不能为空")
    @Size(max=128, message="电子邮箱长度不能超过128个字符")
    private String email;

    @Schema(description = "关联年级列表")
    @NotBlank(message = "关联年级列表不能为空")
    @Size(max=128, message="关联年级列表长度不能超过128个字符")
    private String grades;

    @Schema(description = "学生类型,1=学生,2=其他")
    @NotNull(message = "学生类型,1=学生,2=其他不能为空")
    private Integer studentType;

    @Schema(description = "首次登录时间")
    @NotNull(message = "首次登录时间不能为空")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime firstLoginTime;

    @Schema(description = "教师姓名")
    @NotBlank(message = "教师姓名不能为空")
    @Size(max=64, message="教师姓名长度不能超过64个字符")
    private String teacherName;

    @Schema(description = "教师手机号")
    @NotBlank(message = "教师手机号不能为空")
    @Size(max=20, message="教师手机号长度不能超过20个字符")
    private String teacherMobile;

    @Schema(description = "班级名称")
    @NotBlank(message = "班级名称不能为空")
    @Size(max=64, message="班级名称长度不能超过64个字符")
    private String className;

    @Schema(description = "状态,1=正常,0=禁用")
    @NotNull(message = "状态,1=正常,0=禁用不能为空")
    private Integer status;


}
